import storage from "./storage.ts";
import zhCn from "../locale/zh-cn.ts";
import enUs from "../locale/en-us.ts";
export default {
    setLocale: (value: string) => {
        storage.set('locale', value)
    },
    getLabel:(key:string)=>{
        const locale=storage.get('locale')
        switch (locale) {
            case 'zh-cn':
                return zhCn[key]
            case 'en-us':
                return enUs[key]
            default :
                throw Error('');
        }
    }
}